<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.5"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>SWM34S_LVGL7.11_SWMUI: C:/Users/DELL/Desktop/Commit/lvgl/SWM34S_LVGL7.11_SWMUI_20230515/APP/Common Module/board_test.c 源文件</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">SWM34S_LVGL7.11_SWMUI<span id="projectnumber">&#160;V7.9</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.9.5 -->
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_0ca16891106f5a3e9ad635a0d6c5f98f.html">APP</a></li><li class="navelem"><a class="el" href="dir_df4e0e4e72f77ab290fd1a24f190250a.html">Common Module</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle"><div class="title">board_test.c</div></div>
</div><!--header-->
<div class="contents">
<a href="board__test_8c.html">浏览该文件的文档.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno">    1</span> </div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno">   22</span><span class="preprocessor">#include &quot;<a class="code" href="board__test_8h.html">board_test.h</a>&quot;</span></div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno">   23</span> </div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno">   24</span><span class="comment">/* 板级测试-仅用作入库</span></div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno">   25</span><span class="comment">#include &quot;board_test.h&quot;</span></div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno">   26</span><span class="comment">if (USBH_MSC_Info.Ready != 0) // U 盘插入测试</span></div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno">   27</span><span class="comment">{</span></div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno">   28</span><span class="comment">    static uint8_t init_flag = 1;</span></div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno">   29</span><span class="comment">    if (init_flag != 0)</span></div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno">   30</span><span class="comment">    {</span></div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno">   31</span><span class="comment">        init_flag = 0;</span></div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno">   32</span><span class="comment">        board_init();</span></div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno">   33</span><span class="comment">    }</span></div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno">   34</span><span class="comment"></span> </div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno">   35</span><span class="comment">    static uint32_t i_ms = 0;</span></div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno">   36</span><span class="comment">    if (i_ms++ &gt;= 100) //翻转间隔 100 ms</span></div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno">   37</span><span class="comment">    {</span></div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno">   38</span><span class="comment">        i_ms = 0;</span></div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno">   39</span><span class="comment">        board_test();</span></div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno">   40</span><span class="comment">    }</span></div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno">   41</span><span class="comment">}*/</span></div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno">   42</span> </div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno">   43</span><span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code hl_function" href="board__test_8c.html#ab6a8b273c8ecc9fdf8b1c79e84d166ea">verify_io_init</a>(<span class="keywordtype">void</span>);</div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno">   44</span><span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code hl_function" href="board__test_8c.html#a3fa4048f1b554b09261f0f48ffa93ce6">verify_io_exec</a>(<span class="keywordtype">void</span>);</div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno">   45</span> </div>
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"><a class="line" href="board__test_8c.html#a916f2adc2080b4fe88034086d107a8dc">   52</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="board__test_8c.html#a916f2adc2080b4fe88034086d107a8dc">board_init</a>(<span class="keywordtype">void</span>)</div>
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno">   53</span>{</div>
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno">   54</span>    <a class="code hl_function" href="board__test_8c.html#ab6a8b273c8ecc9fdf8b1c79e84d166ea">verify_io_init</a>();</div>
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno">   55</span>}</div>
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno">   56</span> </div>
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"><a class="line" href="board__test_8c.html#a4896cf9f06c27eb42255c24a5be3d553">   63</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="board__test_8c.html#a4896cf9f06c27eb42255c24a5be3d553">board_test</a>(<span class="keywordtype">void</span>)</div>
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno">   64</span>{</div>
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno">   65</span>    <a class="code hl_function" href="board__test_8c.html#a3fa4048f1b554b09261f0f48ffa93ce6">verify_io_exec</a>();</div>
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno">   66</span>}</div>
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno">   67</span> </div>
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"><a class="line" href="board__test_8c.html#ab6a8b273c8ecc9fdf8b1c79e84d166ea">   74</a></span><span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code hl_function" href="board__test_8c.html#ab6a8b273c8ecc9fdf8b1c79e84d166ea">verify_io_init</a>(<span class="keywordtype">void</span>)</div>
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno">   75</span>{</div>
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno">   76</span><span class="preprocessor">#if (SWM34S_LCM_PCBV == SWM34SRE_PIN64_A001)</span></div>
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno">   77</span><span class="comment">//    GPIO_Init(GPIOC, PIN8, 1, 1, 0, 0);//TP_MISO</span></div>
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno">   78</span><span class="comment">//    GPIO_AtomicClrBit(GPIOC, PIN8);</span></div>
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno">   79</span> </div>
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno">   80</span><span class="preprocessor">#elif (SWM34S_LCM_PCBV == SWM34SVE_PIN100_A001)</span></div>
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno">   81</span>    <span class="comment">//TODO</span></div>
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno">   82</span> </div>
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno">   83</span><span class="preprocessor">#elif (SWM34S_LCM_PCBV == SWM34SVE_PIN100_A002)</span></div>
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno">   84</span>    GPIO_Init(GPIOB, PIN3, 1, 1, 0, 0);</div>
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno">   85</span>    GPIO_Init(GPIOB, PIN4, 1, 1, 0, 0);</div>
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno">   86</span>    GPIO_AtomicClrBit(GPIOB, PIN3);</div>
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno">   87</span>    GPIO_AtomicClrBit(GPIOB, PIN4);</div>
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno">   88</span> </div>
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno">   89</span>    GPIO_Init(GPIOC, PIN6, 1, 1, 0, 0);</div>
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno">   90</span>    GPIO_Init(GPIOC, PIN7, 1, 1, 0, 0);</div>
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno">   91</span>    GPIO_AtomicClrBit(GPIOC, PIN6);</div>
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno">   92</span>    GPIO_AtomicClrBit(GPIOC, PIN7);</div>
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno">   93</span> </div>
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno">   94</span>    GPIO_Init(GPIOD, PIN10, 1, 1, 0, 0);</div>
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno">   95</span>    GPIO_Init(GPIOD, PIN12, 1, 1, 0, 0);</div>
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno">   96</span>    GPIO_Init(GPIOD, PIN13, 1, 1, 0, 0);</div>
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno">   97</span>    GPIO_Init(GPIOD, PIN14, 1, 1, 0, 0);</div>
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno">   98</span>    GPIO_Init(GPIOD, PIN15, 1, 1, 0, 0);</div>
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno">   99</span>    GPIO_AtomicClrBit(GPIOD, PIN10);</div>
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno">  100</span>    GPIO_AtomicClrBit(GPIOD, PIN12);</div>
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno">  101</span>    GPIO_AtomicClrBit(GPIOD, PIN13);</div>
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno">  102</span>    GPIO_AtomicClrBit(GPIOD, PIN14);</div>
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno">  103</span>    GPIO_AtomicClrBit(GPIOD, PIN15);</div>
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno">  104</span> </div>
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno">  105</span>    GPIO_Init(GPIOM, PIN3, 1, 1, 0, 0);</div>
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno">  106</span>    GPIO_Init(GPIOM, PIN7, 1, 1, 0, 0);</div>
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno">  107</span>    GPIO_Init(GPIOM, PIN9, 1, 1, 0, 0);</div>
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno">  108</span>    GPIO_Init(GPIOM, PIN10, 1, 1, 0, 0);</div>
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno">  109</span>    GPIO_Init(GPIOM, PIN15, 1, 1, 0, 0);</div>
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno">  110</span>    GPIO_AtomicClrBit(GPIOM, PIN3);</div>
<div class="line"><a id="l00111" name="l00111"></a><span class="lineno">  111</span>    GPIO_AtomicClrBit(GPIOM, PIN7);</div>
<div class="line"><a id="l00112" name="l00112"></a><span class="lineno">  112</span>    GPIO_AtomicClrBit(GPIOM, PIN9);</div>
<div class="line"><a id="l00113" name="l00113"></a><span class="lineno">  113</span>    GPIO_AtomicClrBit(GPIOM, PIN10);</div>
<div class="line"><a id="l00114" name="l00114"></a><span class="lineno">  114</span>    GPIO_AtomicClrBit(GPIOM, PIN15);</div>
<div class="line"><a id="l00115" name="l00115"></a><span class="lineno">  115</span> </div>
<div class="line"><a id="l00116" name="l00116"></a><span class="lineno">  116</span><span class="preprocessor">#endif </span><span class="comment">// SWM34S_LCM_PCBV</span></div>
<div class="line"><a id="l00117" name="l00117"></a><span class="lineno">  117</span>}</div>
<div class="line"><a id="l00118" name="l00118"></a><span class="lineno">  118</span> </div>
<div class="line"><a id="l00125" name="l00125"></a><span class="lineno"><a class="line" href="board__test_8c.html#a3fa4048f1b554b09261f0f48ffa93ce6">  125</a></span><span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code hl_function" href="board__test_8c.html#a3fa4048f1b554b09261f0f48ffa93ce6">verify_io_exec</a>(<span class="keywordtype">void</span>)</div>
<div class="line"><a id="l00126" name="l00126"></a><span class="lineno">  126</span>{</div>
<div class="line"><a id="l00127" name="l00127"></a><span class="lineno">  127</span><span class="preprocessor">#if (SWM34S_LCM_PCBV == SWM34SRE_PIN64_A001)</span></div>
<div class="line"><a id="l00128" name="l00128"></a><span class="lineno">  128</span><span class="comment">//  GPIO_AtomicInvBit(GPIOC, PIN8);//TP_MISO</span></div>
<div class="line"><a id="l00129" name="l00129"></a><span class="lineno">  129</span> </div>
<div class="line"><a id="l00130" name="l00130"></a><span class="lineno">  130</span><span class="preprocessor">#elif (SWM34S_LCM_PCBV == SWM34SVE_PIN100_A001)</span></div>
<div class="line"><a id="l00131" name="l00131"></a><span class="lineno">  131</span>    <span class="comment">//TODO</span></div>
<div class="line"><a id="l00132" name="l00132"></a><span class="lineno">  132</span> </div>
<div class="line"><a id="l00133" name="l00133"></a><span class="lineno">  133</span><span class="preprocessor">#elif (SWM34S_LCM_PCBV == SWM34SVE_PIN100_A002)</span></div>
<div class="line"><a id="l00134" name="l00134"></a><span class="lineno">  134</span> </div>
<div class="line"><a id="l00135" name="l00135"></a><span class="lineno">  135</span>    GPIO_AtomicInvBit(GPIOB, PIN3);</div>
<div class="line"><a id="l00136" name="l00136"></a><span class="lineno">  136</span>    GPIO_AtomicInvBit(GPIOB, PIN4);</div>
<div class="line"><a id="l00137" name="l00137"></a><span class="lineno">  137</span> </div>
<div class="line"><a id="l00138" name="l00138"></a><span class="lineno">  138</span>    GPIO_AtomicInvBit(GPIOC, PIN6);</div>
<div class="line"><a id="l00139" name="l00139"></a><span class="lineno">  139</span>    GPIO_AtomicInvBit(GPIOC, PIN7);</div>
<div class="line"><a id="l00140" name="l00140"></a><span class="lineno">  140</span> </div>
<div class="line"><a id="l00141" name="l00141"></a><span class="lineno">  141</span>    GPIO_AtomicInvBit(GPIOD, PIN10);</div>
<div class="line"><a id="l00142" name="l00142"></a><span class="lineno">  142</span>    GPIO_AtomicInvBit(GPIOD, PIN12);</div>
<div class="line"><a id="l00143" name="l00143"></a><span class="lineno">  143</span>    GPIO_AtomicInvBit(GPIOD, PIN13);</div>
<div class="line"><a id="l00144" name="l00144"></a><span class="lineno">  144</span>    GPIO_AtomicInvBit(GPIOD, PIN14);</div>
<div class="line"><a id="l00145" name="l00145"></a><span class="lineno">  145</span>    GPIO_AtomicInvBit(GPIOD, PIN15);</div>
<div class="line"><a id="l00146" name="l00146"></a><span class="lineno">  146</span> </div>
<div class="line"><a id="l00147" name="l00147"></a><span class="lineno">  147</span>    GPIO_AtomicInvBit(GPIOM, PIN3);</div>
<div class="line"><a id="l00148" name="l00148"></a><span class="lineno">  148</span>    GPIO_AtomicInvBit(GPIOM, PIN7);</div>
<div class="line"><a id="l00149" name="l00149"></a><span class="lineno">  149</span>    GPIO_AtomicInvBit(GPIOM, PIN9);</div>
<div class="line"><a id="l00150" name="l00150"></a><span class="lineno">  150</span>    GPIO_AtomicInvBit(GPIOM, PIN10);</div>
<div class="line"><a id="l00151" name="l00151"></a><span class="lineno">  151</span>    GPIO_AtomicInvBit(GPIOM, PIN15);</div>
<div class="line"><a id="l00152" name="l00152"></a><span class="lineno">  152</span> </div>
<div class="line"><a id="l00153" name="l00153"></a><span class="lineno">  153</span><span class="preprocessor">#endif </span><span class="comment">// SWM34S_LCM_PCBV</span></div>
<div class="line"><a id="l00154" name="l00154"></a><span class="lineno">  154</span>}</div>
<div class="ttc" id="aboard__test_8c_html_a3fa4048f1b554b09261f0f48ffa93ce6"><div class="ttname"><a href="board__test_8c.html#a3fa4048f1b554b09261f0f48ffa93ce6">verify_io_exec</a></div><div class="ttdeci">static void verify_io_exec(void)</div><div class="ttdoc">执行测试项(IO 翻转)</div><div class="ttdef"><b>Definition:</b> <a href="board__test_8c_source.html#l00125">board_test.c:125</a></div></div>
<div class="ttc" id="aboard__test_8c_html_a4896cf9f06c27eb42255c24a5be3d553"><div class="ttname"><a href="board__test_8c.html#a4896cf9f06c27eb42255c24a5be3d553">board_test</a></div><div class="ttdeci">void board_test(void)</div><div class="ttdoc">PCB 板级测试</div><div class="ttdef"><b>Definition:</b> <a href="board__test_8c_source.html#l00063">board_test.c:63</a></div></div>
<div class="ttc" id="aboard__test_8c_html_a916f2adc2080b4fe88034086d107a8dc"><div class="ttname"><a href="board__test_8c.html#a916f2adc2080b4fe88034086d107a8dc">board_init</a></div><div class="ttdeci">void board_init(void)</div><div class="ttdoc">PCB 板级测试项目初始化</div><div class="ttdef"><b>Definition:</b> <a href="board__test_8c_source.html#l00052">board_test.c:52</a></div></div>
<div class="ttc" id="aboard__test_8c_html_ab6a8b273c8ecc9fdf8b1c79e84d166ea"><div class="ttname"><a href="board__test_8c.html#ab6a8b273c8ecc9fdf8b1c79e84d166ea">verify_io_init</a></div><div class="ttdeci">static void verify_io_init(void)</div><div class="ttdoc">测试项(IO 端口)的初始化</div><div class="ttdef"><b>Definition:</b> <a href="board__test_8c_source.html#l00074">board_test.c:74</a></div></div>
<div class="ttc" id="aboard__test_8h_html"><div class="ttname"><a href="board__test_8h.html">board_test.h</a></div><div class="ttdoc">PCB 板级测试, 仅用于 Demo 板内部入库测试验证</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
制作者&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.5
</small></address>
</body>
</html>
